<? if($GLOBALS['USER']->IsAdmin()):?>
<div class="container">
<a title="Add element" href="/kernel/adm/addElement.php?bid=<?=$result['block_id']?>" class="iframe reload"><?=t('Add Element'); ?></a>
</div>
<? endif; ?>

    
<? if(!empty($result['elements'])):?>
<? foreach($result['elements'] as $element):?>
<div class="container">
    <div class="container-head"><?=$element['fields']['name']['value'];?>
        <? if($GLOBALS['USER']->IsAdmin()):?><a title="Edit element" href="<?=$element['edit_link']?>" class="iframe reload container-head-corner-button">Edit</a><? endif; ?>
    </div>
    <? if(isset($params['add_label'])): ?><span class="add_label"><?=$params['add_label']?></span><? endif; ?>
</div>
<? endforeach; endif;?>
